import javafx.util.Pair;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class list_stream {
    public static void main(String[] args) {
        List<Pair<Integer, Character>> list = new ArrayList<>();
        list.add(new Pair<>(1, 'A'));
        list.add(new Pair<>(2, 'B'));
        list.add(new Pair<>(3, 'C'));

        int[] array = list.stream().mapToInt(Pair::getKey).toArray();
        List<Integer> intList = list.stream().map(Pair::getKey).collect(Collectors.toList());
        Map<Integer, Pair<Integer, Character>> map = list.stream().collect(Collectors.toMap(Pair::getKey, e -> e, (e1, e2) -> e1));
    }
}
